trans_table="table"
trans_all="all"
clean="clean"


compare_code()
{
    mkdir GCC_output
    gcc -c GB2312_data_trans.c -o./GCC_output/GB2312_data_trans.o
    gcc -c main.c -o./GCC_output/main.o
    gcc -o ./GCC_output/gen_font ./GCC_output/GB2312_data_trans.o ./GCC_output/main.o
}

# 根据第一个参数执行不同的操作
case "$1" in
    $trans_all)
    compare_code
       ./GCC_output/gen_font all > ./GCC_output/font_all.c
        ;;

    $trans_table)
    compare_code
        ./GCC_output/gen_font table > ./GCC_output/font_trans_table.c
        ;;
    $clean)
        rm -rf GCC_output
        ;;

    *)
        echo "未知的选项: $1"
        exit 1
        ;;
esac

